package com.qf.zmt.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.common.http.Result;
import com.qf.entity.dto.Goods;
import com.qf.entity.dto.GoodsType;
import com.qf.entity.po.LoginMerchant;
import com.qf.service.impl.GoodsService;
import com.qf.service.impl.GoodsTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.util.UUID;

@Controller
@RequestMapping("goods")
public class GoodsController {

    @Autowired
    private GoodsTypeService goodsTypeService;
    @Autowired
    private GoodsService goodsService;

    @RequestMapping("list")
    public String toList(Model model, LoginMerchant loginMerchant) {
        model.addAttribute("goodsList", goodsService.getByMerchantUserId(loginMerchant));
        return "goods/list";
    }


}
